//
//  SlideViewController.m
//  Qyer
//
//  Created by 赵宇 on 15/9/9.
//  Copyright (c) 2015年 赵宇. All rights reserved.
//

#import "SlideViewController.h"
#import "BaseHeader.h"
@interface SlideViewController ()<UMSocialUIDelegate>

@end

@implementation SlideViewController
-(void)dealloc
{
    [_url release];
    [super dealloc];
}
-(void)viewWillAppear:(BOOL)animated
{
     self.tabBarController.tabBar.hidden = YES;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    [self creatNav];
    UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, SCREEN_WIDTH, SCREEN_HEIGHT-64)];
    [self.view addSubview:webView];
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:self.url]];
    self.tabBarController.tabBar.hidden = YES;
    [webView loadRequest:request];
//    [self shareWebInfor];

}
-(void)creatNav
{
    UIView *nav = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 64)];
    nav.backgroundColor = [UIColor whiteColor];
    UIButton *backB = [UIButton buttonWithType:UIButtonTypeCustom];
    backB.frame = CGRectMake(10, 25, 30, 30);
    [backB setImage:[UIImage imageNamed:@"iconfont-31fanhui1"] forState:UIControlStateNormal];
    [backB addTarget:self action:@selector(gogogo) forControlEvents:UIControlEventTouchUpInside];
    [nav addSubview:backB];
    [self.view addSubview:nav];
    [nav release];
}
-(void)gogogo
{
    [self.navigationController popViewControllerAnimated:YES];
}
//-(void)shareWebInfor
//{
//    UIView *tabView = [[UIView alloc]initWithFrame:CGRectMake(0,SCREEN_HEIGHT - 48  , SCREEN_WIDTH, 48)];
//    tabView.backgroundColor = [UIColor colorWithRed:250./255 green:250./255 blue:250./255 alpha:1];
//    UIButton *shareBut = [UIButton buttonWithType:UIButtonTypeCustom];
//    shareBut.frame = CGRectMake(SCREEN_WIDTH/3, -10, SCREEN_WIDTH/3, 68);
//    [shareBut setImage:[UIImage imageNamed:@"iconfont-fenxiang"] forState:UIControlStateNormal];
//    [shareBut addTarget:self action:@selector(goToShare) forControlEvents:UIControlEventTouchUpInside];
//    [tabView addSubview:shareBut];
//    [self.view addSubview:tabView];
//    
//}
//-(void)goToShare
//{
//
//     [UMSocialSnsService presentSnsIconSheetView:self appKey:@"507fcab25270157b37000010" shareText:@"你要分享的文字" shareImage:@"icon.png" shareToSnsNames:[NSArray arrayWithObjects:UMShareToSina,UMShareToTencent,UMShareToRenren,nil] delegate:self];
//}
-(void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
